package com.wandian.data
{
	import avmplus.getQualifiedClassName;
	
	import com.adobe.serialization.json.JSON;
	import com.wandian.ApplicationFacade;
	import com.wandian.controller.CLZNoticeName;
	import com.wandian.controller.LoginCommand;
	import com.wandian.model.UserInfoProxy;
	import com.wandian.model.vo.FaceVo;
	import com.wandian.model.vo.HonorVo;
	import com.wandian.model.vo.PropVo;
	import com.wandian.model.vo.RoomVo;
	import com.wandian.model.vo.VIPVo;
	import com.wandian.view.components.ui.CardCount;
	
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	import flash.events.TimerEvent;
	import flash.filters.GlowFilter;
	import flash.geom.Point;
	import flash.system.ApplicationDomain;
	import flash.utils.Dictionary;
	import flash.utils.Timer;
	import flash.utils.describeType;
	import flash.utils.getDefinitionByName;

	/**
	 * 游戏基础数据
	 * @author long
	 */
	public class GameData
	{
		public static var is800:Boolean=false; //是否是800*600,否则是960*630
		public static var key:int=1;
//		public static var roomTypeArray:Array=[[],[],[],[],[]];
		public static var roomCount:int=0; //房间总数
		public static var arrAllRoom:Array;
		public static var notEmptyCount:int=0;
		/**
		 * 是否开启roomCode
		 * @default 
		 */
		public static var enableRoomCode:int=0; 
		public static var floorCount:int=0; //每楼的房间数
		public static var lastSeat:int=0;
		public static var bettime:int=0;
		public static var arrSwfUrl:Array=[];
		public static var maxTableType:String="G"
		public static var minTableType:String=""
		public static var configXML:String="view/data/config.xml";
		/**
		 * 是否连接网络
		 */
		public static var isConnectSocket:Boolean=false;
		/**
		 * ui目录
		 */
		public static var uiDir:String;
		/**
		 * 地图资源路径
		 */
		public static var mapSource:String;
		/**
		 * 大load界面链接
		 */
		public static var bigLoadingURL:String;

		/**
		 * 游戏刷新时间
		 */
		public static var gameRefreshInterval:int;
		/**
		 * 没有玩家数据，是否是第一次游戏
		 */
		public static var isFirstGame:Boolean=true;

		/**
		 * 鼠标移上去显示
		 */
		public static const MOUSE_ON:Array=[new GlowFilter(0xffff00, 1, 8, 8, 2, 2)];

		/**
		 * 鼠标离开
		 */
		public static const MOUSE_OUT:Array=null;
		/**
		 * 菊花
		 */
		public static const MC_LOADING:String="mc_loading";

		//GameData
		public static const HIDE_TIP:String="-1";
		public static const HIGH_CARD:String="0";
		public static const ONE_PAIR:String="1";
		public static const TWO_PAIR:String="2";
		public static const THREE_OF_AKIND:String="3";
		public static const STRAIGHT:String="4";
		public static const FLUSH:String="5";
		public static const FULL_HOUSE:String="6";
		public static const FOUR_OF_AKIND:String="7";
		public static const STRAIGHT_FLUSH:String="8";
		public static const STRAIGHT_FLUSH_HIGHT:String="9";
		public static var time:int=20;
		public static const ALL:String="ALL";
		public static const P1:String="P1";
		public static const G0:String="G0";
		public static const G1:String="G1";
		public static const G2:String="G2";
		public static const G3:String="G3";
		public static const M1:String="M1";
		public static const M2:String="M2";
		public static const G:String="G";
		public static const BLIND_MIN:int=6;
		public static const BLIND_MAX:int=7;
		/**
		 * 观看
		 * @default
		 */
		public static const LOOK_ON:int=100;
		/**
		 * 等待下一场
		 * @default
		 */
		public static const WAIT_NEXT_GAME:int=101;
		/**
		 * 正在玩游戏
		 * @default
		 */
		public static const PLAYING_GAME:int=102;
		/**
		 * 玩的掉线
		 * @default
		 */
		public static const PLAYING_CLOSE_SOCKE:int=103;
		/**
		 * 没玩都掉线
		 * @default
		 */
		public static const NO_PLAYING_CLOSE_SOCKE:int=105;
		/**
		 * 等待买入
		 * @default
		 */
		public static const WAIT_BUY_IN:int=104;
		/**
		 * 看牌
		 * @default
		 */
		public static const CHECK:int=1;
		/**
		 * 放弃
		 * @default
		 */
		public static const FOLD:int=2;
		/**
		 * 跟注
		 * @default
		 */
		public static const CALL:int=3;
		/**
		 * 加注
		 * @default
		 */
		public static const RAISE:int=4;
		/**
		 * 全下
		 * @default
		 */
		public static const ALLIN:int=5;
		public static const SHOP_HOTPROP_TYPE:int=0;
		public static const SHOP_INTERACTIVEPROP_TYPE:int=1;
		public static const SHOP_GIFT_TYPE:int=2;
		public static const SHOP_VIP_TYPE:int=3;
		public static const USE_GOLD_RADIO:int=1;
		public static const USE_CARD_RADIO:int=2;
		public static const RADIO1:int=1;
		public static const RADIO2:int=2;
		public static const RADIO3:int=3;
		public static const SYSTEM_MESSAGE:int=1;
		public static const GMAE_MESSAGE:int=2;
		public static const PAGE_MESSAGE:int=3;
		public static const PROP_PCATE_ID_1:int=1;
		public static const PROP_KICK_PFRAME_ID:int=2;
		public static const PROP_BANSPEAK_PFRAME_ID:int=3;
		public static const PROP_SPEAK_PFRAME_ID:int=4;
		public static const PROP_DEFENCE_KICK_PFRAME_ID:int=5;
		public static const PROP_KISS_PFRAME_ID:int=6;
		public static const PROP_HANDSHAKE_PFRAME_ID:int=7;
		public static const PROP_FLOWER_PFRAME_ID:int=8;
		public static const PROP_EGG_PFRAME_ID:int=9;
		public static const PROP_PCATE_ID_PERSON:int=3;
		public static const PROP_PCATE_ID_GIFT:int=11;
		public static const PROP_USE_GOLD:int=0;
		public static const PROP_USE_BAG:int=1;
		public static var IS_UPDATE_SERVER:Boolean=false;
		public static var IS_ENTER_ROOM:Boolean=false;
		public static const MOP_SID:int=4;
		public static const TIANYA_SID:int=2;
		public static const UU_SID:int=3;
		public static const QZONE_SID:int=5;
		public static const FRIEND_SID:int=6;
		public static const QQSGAME_SID:int=1;
		public static var sesskey:String="sesskey";
		public static var gateway:String;
		public static var flashUrl:String="view/"; //可以设置成网络
//		public static var flashUrl:String="http://192.168.1.103/texas/view/data/"; //可以设置成网络
		public static var dataUrl:String;
		public static var flashver:Object={xml: "view/data/"};
		public static var PORT:int=9999;
//		public static var HOST:String="192.168.1.103";
		public static var HOST:String="127.0.0.1";

		//globledata

		private var _strMaxTableType:String=GameData.G;
		private var _strMinTableType:String="";
		private var _nSeatId:int=0;
		private var _onlineTime:uint;
		public var isStopGame:Boolean=false;
		public var _onLineSitTime:uint;
		public var _onLineRewardNum:int;
		public var _returnRoomNum:int=0;
		public var _isRequestFast:Boolean=false;
		private const DIGIT:uint=10000000;
		private const K1000:uint=1000;
		public static var LogoClass:Class=Class(LogoClass);
		public static var domainArr:Array=[];
		public static var arrNoticeMsg:Array=[];
		public static var arrFriendRequest:Array=[];
		public static var arrHonorTip:Array=[];
		public static var config:Object={stageW: 960, stageH: 630};
		public static var tip:Object={CLOSE: "关闭", OK: "确定", WAIT_CHAT_TIP: "请稍候在发"};
		public static var swf:Object={help: "view/ui/help.swf"};
		public static var propXml:XML;
		public static var roomXml:XML;
		public static var honorXml:XML;
		public static var commonXML:XML;
		public static var faceXML:XML;
		public static var lotteryXML:XML;
//		public static var configXML:XML;
		public static var _objRoom:RoomVo=null;
		public static var _arrMyPrize:Array=[];
		/**
		 * 当前操作人的坐位id
		 * @default
		 */
		public static var _nCurSeatId:int=0;

		public function GameData()
		{
			this._facade=ApplicationFacade.getInstance();
		}
		private static var instance:GameData;
		private var _facade:ApplicationFacade;

		public static function getInstance():GameData
		{
			if (instance == null)
			{
				instance=new GameData();
			}
			return instance;
		}

		public function constRoomVoEnter(room:RoomVo):RoomVo
		{
			if (getInstance().userInfo.userVo.money < room.minBlind)
			{
				room.close=1;
			}
			else
			{
				room.close=0;
			}
			/*if (getInstance().judgeMoneyType(room.type))
			{
				if (getInstance().userInfo.userVo.money < room.min)
				{
					room.close=1;
				}
				else
				{
					if (room.type != GameData.G0)
					{
					}
					if (getInstance().userInfo.userVo.gold < room.max * 5)
					{
					}
					if (room.type != GameData.P1)
					{
					}
					if (getInstance().userInfo.userVo.gold < 1000000)
					{
						room.close=2;
					}
					else
					{
						room.close=0;
					}
				}
			}
			else
			{
				room.close=0;
			}*/
			return room;
		}

		/**
		 * 当前玩家的坐位id
		 * @return
		 */
		public function get seatId():int
		{
//			trace("GameData取得当前座位:" + _nSeatId);
			return this._nSeatId;
		}

		public function set seatId(curSeat:int):void
		{
			this._nSeatId=curSeat;
//			trace("GameData设置当前座位:" + _nSeatId);
			this._facade.sendNotification(CLZNoticeName.UPDATE_SEAT_ID, this._nSeatId);
			return;
		}

		public function get minTableType():String
		{
			return this._strMinTableType;
		}

		public function set minTableType(param1:String):void
		{
			this._strMinTableType=param1;
			return;
		}

		public function get maxTableType():String
		{
			return this._strMaxTableType;
		}

		public function set maxTableType(param1:String):void
		{
			this._strMaxTableType=param1;
			return;
		}

		public function counstK(num:Number):String
		{
			var strMoney:String;
			var len:uint;
			var str:String;
			var money:Number;
			var value:String;
			try
			{
				value=num.toString();
				strMoney;
				len=this.DIGIT.toString().length;
				if (value.length > len)
				{
					str=value.replace(new RegExp(" ", "/gi"), "");
					money=Number(str.substring(0, str.length - (this.K1000.toString().length - 1)));
					strMoney=money + "K";
				}
				else if (value.length >= 4)
				{
					strMoney=(num / 1000) + "K";
				}
				else
				{
					strMoney=value.toString();
				}
			}
			catch (e:Error)
			{
			}
			return strMoney;
		}

		public function get userInfo():UserInfoProxy
		{
			return this._facade.retrieveProxy(UserInfoProxy.NAME) as UserInfoProxy;
		}

		public static function replaceStrTipHtml(param1:String):String
		{
			return param1.replace(new RegExp("{", "gi"), "<").replace(new RegExp("}", "gi"), ">").replace(new RegExp("\n", "gi"), String.fromCharCode("\n"));
		}

		public static function replaceStrValue(param1:String, param2:String, param3):String
		{
			var _loc_4:String=param1.replace(new RegExp("{", "gi"), "<").replace(new RegExp("}", "gi"), ">");
			return _loc_4.replace(new RegExp("%" + param2 + "%", "gi"), param3);
		}

		public static function sortMinToMaxArray(arrData:Array, id:String):Array
		{
			if (arrData == null)
				return null;
			var count:int=0;
			var temp:*=new Object();
			var index:int=0;
			while (index < arrData.length)
			{

				count=0;
				while (count < (arrData.length - 1))
				{

					if (arrData[count][id] > arrData[(count + 1)][id])
					{
						temp=arrData[count];
						arrData[count]=arrData[(count + 1)];
						arrData[(count + 1)]=temp;
					}
					count=count + 1;
				}
				index=index + 1;
			}
			return arrData;
		}

		public static function sortMaxToMinArray(arrRoom:Array, field:String):Array
		{
			if (arrRoom == null)
				return null;
			var _loc_5:int=0;
			var tempRoom:*=new Object();
			var count:int=0;
			while (count < arrRoom.length)
			{

				_loc_5=0;
				while (_loc_5 < (arrRoom.length - 1))
				{

					if (arrRoom[_loc_5][field] < arrRoom[(_loc_5 + 1)][field])
					{
						tempRoom=arrRoom[_loc_5];
						arrRoom[_loc_5]=arrRoom[(_loc_5 + 1)];
						arrRoom[(_loc_5 + 1)]=tempRoom;
					}
					_loc_5=_loc_5 + 1;
				}
				count=count + 1;
			}
			return arrRoom;
		}

		public static function removeNumChildre(parentMc:DisplayObjectContainer, boolRemove:Boolean=false):void
		{
			var child:*;
			if (parentMc == null)
			{
				return;
			}
			while (parentMc.numChildren)
			{

				child=parentMc.removeChildAt(0);
				stopMcAllChild(child);
				if (!(child as Sprite))
				{
				}
				if (child as MovieClip)
				{
				}
				if (boolRemove)
				{
					removeNumChildre(child);
				}
				child=null;
			}
			return;
		}

		public static function checkStageHitTest(mc:DisplayObject, point:Point, mc2:DisplayObject=null):Boolean
		{
			if (mc != null)
			{
				if (mc.hitTestPoint(point.x, point.y))
				{
					return true;
				}
			}
			if (mc2 != null)
			{
				if (mc2.hitTestPoint(point.x, point.y))
				{
					return true;
				}
			}
			return false;
		}

		public static function getFastMsgXML():Array
		{
			var _loc_1:*=commonXML.fastmsg.item;
			var _loc_2:Array=[];
			var _loc_3:uint=0;
			while (_loc_3 < _loc_1.length())
			{

				_loc_2.push(_loc_1[_loc_3].@msg);
				_loc_3=_loc_3 + 1;
			}
			return _loc_2;
		}

		public static function getNoticeTipXML():Array
		{
			var _loc_1:*=commonXML.notice.item;
			var _loc_2:Array=[];
			var _loc_3:uint=0;
			while (_loc_3 < _loc_1.length())
			{

				_loc_2.push(_loc_1[_loc_3].@prompt);
				_loc_3=_loc_3 + 1;
			}
			return _loc_2;
		}

		public static function getVIPXMLById(param1:int):VIPVo
		{
			var _loc_3:VIPVo=null;
			var _loc_2:*=commonXML.vip.item;
			var _loc_4:uint=0;
			while (_loc_4 < _loc_2.length())
			{

				if (_loc_2[_loc_4].@id == param1)
				{
					_loc_3=new VIPVo();
					_loc_3.id=_loc_2[_loc_4].@id;
					_loc_3.name=_loc_2[_loc_4].@name;
					_loc_3.cost=_loc_2[_loc_4].@cost;
					_loc_3.img=_loc_2[_loc_4].@img;
					_loc_3.content=_loc_2[_loc_4].@content;
					_loc_3.objContent=com.adobe.serialization.json.JSON.decode(_loc_3.content);
					break;
				}
				_loc_4=_loc_4 + 1;
			}
			_loc_3.img=GameData.flashUrl + "img/vip/" + _loc_3.id + ".png";
			return _loc_3;
		}

		public static function getWealthXMLByType(param1:int):Array
		{
			var _loc_2:*=commonXML.wealth.item;
			var _loc_3:Array=[];
			var _loc_4:uint=0;
			while (_loc_4 < _loc_2.length())
			{

				if (_loc_2[_loc_4].@type == param1)
				{
					_loc_3=[_loc_2[_loc_4].@title, _loc_2[_loc_4].@content];
					break;
				}
				_loc_4=_loc_4 + 1;
			}
			return _loc_3;
		}

		public static function getFaceByPcate(pcate:int):Array
		{
			var xmlList:XMLList;
			var arrFace:Array=[];
			var i:uint=0;
			var faceVo:FaceVo;
			var attrList:XMLList;
			var _loc_4:int=0;
			var faceXml:XMLList=faceXML.face;
			var _loc_3:*=new XMLList("");
			while (i < faceXml.length())
			{
				if (faceXml[i].@pcate == pcate)
				{
					xmlList=faceXml[i].children();
					break;
				}

				i++;
			}
			i=0;
			while (i < xmlList.length())
			{
				faceVo=new FaceVo();
				attrList=xmlList[i].attributes();
				faceVo.pframe=attrList[0];
				faceVo.name=attrList[1];
				faceVo.pcate=pcate;
				faceVo.icon=GameData.flashUrl + "img/face/" + faceVo.pcate + "-" + faceVo.pframe + ".png";
				faceVo.ClassSWF=getFaceUrl(faceVo.pcate, faceVo.pframe);
				arrFace.push(faceVo);
				i++;
			}
			return arrFace;
		}

		public static function getFaceUrl(param1:int, param2:int):String
		{
			return "SWF-" + param1 + "-" + param2;
		}

		public static function getLevel(money:Number):int
		{
			var _loc_2:int=1;
			var _loc_3:*=commonXML.level.item;
			var _loc_4:Array=[];
			var _loc_5:*=_loc_3.length();
			var _loc_6:uint=0;
			while (_loc_6 < _loc_5)
			{

				if (_loc_6 == (_loc_5 - 1))
				{
					_loc_2=_loc_3[_loc_6].@level;
					break;
				}
				if (money >= _loc_3[_loc_6].@mingold)
				{
				}
				if (money < _loc_3[(_loc_6 + 1)].@mingold)
				{
					_loc_2=_loc_3[_loc_6].@level;
					break;
				}
				_loc_6=_loc_6 + 1;
			}
			return _loc_2;
		}
		/**
		 * 缓存已经反射过了的对象
		 */
		private static var typeCache:Object=new Object();

		/**
		 * 获取类信息
		 * @param target 要获取的目标对象
		 * @return TypeDescriptorEntry 实例
		 *
		 */
		public static function describeClassType(target:*):TypeDescription
		{

			var className:String=getQualifiedClassName(target);

			/**
			 * 检查缓存中是否已经有目标对象项, 如果有就返回缓存中的内容
			 */
			if (className in typeCache)
				return typeCache[className];


			/**
			 * 暂存属性列表
			 */
			var propertyNames:Array=[];


			/**
			 * 获取类信息, 如果传入的是实例则获取实例类型的类信息
			 */
			var typeInfo:XML=flash.utils.describeType(target is Class ? target : getDefinitionByName(className) as Class);


			/**
			 * 获取类中所有的属性和访问器
			 */
			var properties:XMLList=typeInfo.factory..accessor.(@access != "writeonly") + typeInfo..variable;


			/**
			 * 遍历并存放到 propertyNames 中
			 */
			for each (var propertyInfo:XML in properties)
				propertyNames.push(propertyInfo.@name);


			/**
			 * 创建 TypeDescriptorEntry 的实例并把 propertyNames 等属性丢进去
			 */
			var entry:TypeDescription=new TypeDescription();
			entry.name=className;
			entry.properties=propertyNames;
			entry.typeInfo=typeInfo;


			/**
			 * 缓存到 typeCache 中以便下次从缓存中读取
			 */
			typeCache[className]=entry;

			return entry;
		}

		public static function copyClass(fromeVO:Object, toVO:Object):Object
		{
			var prop:String;
			var xml:*=describeType(toVO);
			var propertyNames:Array=[];
			var element:*=xml.variable;
			var index:int=0;
			while (index < element.length())
			{
				propertyNames.push(element[index].@name.toString());
				index=index + 1;
			}
			index=0;
			while (index < propertyNames.length)
			{
				prop=propertyNames[index];
				try
				{
					if (fromeVO.hasOwnProperty(prop))
					{
						toVO[prop]=fromeVO[prop];
					}
				}
				catch (e:Error)
				{
					trace("copyClass Error:" + e);
				}
				index++;
			}
			return toVO;

		}

		public static function copyClass0(fromeVO:Object, toVO:Object):Object
		{
			var reflect:TypeDescription=describeClassType(fromeVO);
			reflect.Copy(fromeVO, toVO);
			return toVO;
			var variableXML:XML;
			var accessorXML:XML;
			var prop:String;
			var xml:XML=describeType(toVO);
			var propertyNames:Array;
			var index:int=0;
			var xmlvariable:*=xml.variable;
			while (index < xmlvariable.length)
			{

				variableXML=xmlvariable[index];
				propertyNames.push(variableXML.@name);
				index++;
			}
			index=0;
			xmlvariable=xml.accessor;
			while (xmlvariable in index)
			{

				accessorXML=xmlvariable[index];
				if (accessorXML.@access != "readwrite")
				{
				}
				if (accessorXML.@access == "readonly")
				{
					propertyNames.push(accessorXML.@name);
				}
			}
			index=0;
			xmlvariable=propertyNames;
			do
			{

				prop=xmlvariable[index];
				try
				{
					if (fromeVO.hasOwnProperty(prop))
					{
						toVO[prop]=fromeVO[prop];
					}
				}
				catch (e:Error)
				{
				}
			} while (xmlvariable in index)
			return toVO;
		}

		public static function copyProperties(fromeVO:Object, toVO:Object):Object
		{
			var _loc_3:Array=null;
			var _loc_4:int=0;
			if (fromeVO && toVO)
			{
				_loc_3=getObjectPropertyName(fromeVO);
				_loc_4=0;
				while (_loc_4 < _loc_3.length)
				{

					toVO[_loc_3[_loc_4]]=fromeVO[_loc_3[_loc_4]];
					_loc_4++;
				}
			}
			return toVO;
		} // end function

		public static function getObjectPropertyName(obj:Object):Array
		{
			var xml:*=describeType(obj);
			var accessorXml:*=xml..accessor;
			var variableXml:*=xml..variable;
			var _loc_5:*=new Array();
			var _loc_6:int=0;
			_loc_6=0;
			while (_loc_6 < accessorXml.length())
			{

				if (accessorXml[_loc_6].@access == "writeonly" || accessorXml[_loc_6].@access == "readwrite")
				{
					_loc_5.push(accessorXml[_loc_6].@name.toXMLString());
				}
				_loc_6++;
			}
			_loc_6=0;
			while (_loc_6 < variableXml.length())
			{

				_loc_5.push(variableXml[_loc_6].@name.toXMLString());
				_loc_6++;
			}
			return _loc_5;
		} // end function

		public static function copyPropertiesByTarget(fromeVO:Object, toVo:Object):Object
		{
			var arrProperty:Array=null;
			var index:int=0;
			if (fromeVO && toVo)
			{
				arrProperty=getObjectPropertyName(toVo);
				index=0;
				while (index < arrProperty.length)
				{

					toVo[arrProperty[index]]=fromeVO[arrProperty[index]];
					index++;
				}
			}
			return toVo;
		}

		public static function setDate(param1:int, param2:int=0):String
		{
			var time:*=param1;
			var type:*=param2;
			var pad:*=function(param1:int, param2:int):String
			{
				if (param1 < param2)
				{
					return "0" + param1;
				}
				return param1.toString();
			};
			var date:*=new Date(time * 1000);
			switch (type)
			{
				case 0:
				{
					return date.fullYear + "-" + pad((date.month + 1), 10) + "-" + pad(date.date, 10) + " " + pad(date.hours, 10) + ":" + pad(date.minutes, 10) + ":" + pad(date.seconds, 10);
				}
				case 1:
				{
					return date.fullYear + "-" + pad((date.month + 1), 10) + "-" + pad(date.date, 10);
				}
				case 2:
				{
					return pad((date.month + 1), 10) + "-" + pad(date.date, 10);
				}
				case 3:
				{
					return pad(date.hours, 10) + ":" + pad(date.minutes, 10) + ":" + pad(date.seconds, 10);
				}
				case 4:
				{
					return pad((date.month + 1), 10) + "-" + pad(date.date, 10) + " " + pad(date.hours, 10) + ":" + pad(date.minutes, 10) + ":" + pad(date.seconds, 10);
				}
				default:
				{
					break;
				}
			}
			return "";
		}

		public static function getCardIcon(cardStr:String):String
		{
			var _loc_2:String=null;
			var _loc_4:*=CardCount.instance().countCardHuaSe(cardStr.substring(1, 2));
			var _loc_5:*=cardStr.substring(0, 1);
			if (_loc_5 == "T")
			{
				_loc_5="10";
			}
			var _loc_6:Array=["<font color=\'#ff0000\' size = \'22\'>♦</font>", "<font color=\'#000000\' size = \'18\'>♣</font>", "<font color=\'#ff0000\' size = \'16\'>♥</font>", "<font color=\'#000000\' size = \'18\'>♠</font>"];
			_loc_2=_loc_6[(_loc_4 - 1)] + _loc_5;
			return _loc_2;
		}

		public function setOnlineTime(param1:uint, param2:uint=0):void
		{
			var strTip:String;
			var remainingTime:uint;
			var timerOnlineHandler:Function;
			var str:String;
			var userYear:int;
			var userMonth:int;
			var userDay:int;
			var date:Date;
			var year:int;
			var month:int;
			var day:int;
			var objData:Object;
			var value:*=param1;
			var timeCount:*=param2;
			timerOnlineHandler=function(event:TimerEvent):void
			{
				var _loc_2:Object=null;
				var _loc_4:*=remainingTime - 1;
				remainingTime=_loc_4;
				_loc_4=_onlineTime + 1;
				_onlineTime=_loc_4;
				var seatId:int;
				switch (remainingTime)
				{
					case 0:
					{
						if (seatId == 0)
						{
							strTip=GameData.tip["ONLINE_TIME_TIP_3"];
							_loc_2={okNoticeName: CLZNoticeName.GO_VERIFICATION, tip: strTip, tipTitle: GameData.tip["SYSTEM_TIP"], okTip: "GO_VERIFICATION", countTime: 5 * 60 * 60 - timeCount};
							_facade.sendNotification(CLZNoticeName.SHOW_WINDOWS_TIP, _loc_2);
						}
						else
						{
							isStopGame=true;
							_facade.sendNotification(CLZNoticeName.ONLINE_TIME_OUT_GAME);
						}
						break;
					}
					case 1 * 60 * 60:
					{
						strTip=GameData.replaceStrValue(GameData.tip["ONLINE_TIME_TIP"], "NUM", 2);
						_loc_2={okNoticeName: CLZNoticeName.HIDE_WINDOWS_TIP, tip: strTip, tipTitle: GameData.tip["SYSTEM_TIP"], isCancel: false, okTip: "CLOSE_NAME", cancelTip: "", isSendClose: true};
						_facade.sendNotification(CLZNoticeName.SHOW_WINDOWS_TIP, _loc_2);
						break;
					}
					case 2 * 60 * 60:
					{
						strTip=GameData.replaceStrValue(GameData.tip["ONLINE_TIME_TIP"], "NUM", 1);
						_loc_2={okNoticeName: CLZNoticeName.HIDE_WINDOWS_TIP, tip: strTip, tipTitle: GameData.tip["SYSTEM_TIP"], isCancel: false, okTip: "CLOSE_NAME", cancelTip: "", isSendClose: true};
						_facade.sendNotification(CLZNoticeName.SHOW_WINDOWS_TIP, _loc_2);
						break;
					}
					default:
					{
						break;
					}
				}
				return;
			};
			if (this.userInfo.userVo.gp != GameData.QQSGAME_SID)
			{
				return;
			}
			if (this.userInfo.userVo.realname != "")
			{
			}
			if (this.userInfo.userVo.identity != "")
			{
				try
				{
					str=this.userInfo.userVo.identity;
					userYear=int(str.substr(6, 4));
					userMonth=int(str.substr(10, 2));
					userDay=int(str.substr(12, 2));
					date=new Date();
					year=date.getFullYear();
					month=(date.getMonth() + 1);
					day=date.getDate();
					if (year - userYear > 18)
					{
						return;
					}
					else if (year - userYear == 18)
					{
						if (month > userMonth)
						{
							return;
						}
						else if (month == userMonth)
						{
							if (userDay >= day)
							{
								return;
							}
						}
					}
				}
				catch (e:Error)
				{
				}
			}
			var hour:*=int(countTime(value, 2));
			this._onlineTime=value;
			strTip;
			if (hour >= 3)
			{
				strTip=GameData.tip["ONLINE_TIME_TIP_3"];
				objData;
				this._facade.sendNotification(CLZNoticeName.SHOW_WINDOWS_TIP, objData);
				return;
			}
			if (hour >= 2)
			{
				strTip=GameData.replaceStrValue(GameData.tip["ONLINE_TIME_TIP"], "NUM", hour);
				objData;
				this._facade.sendNotification(CLZNoticeName.SHOW_WINDOWS_TIP, objData);
			}
			else if (hour >= 1)
			{
				strTip=GameData.replaceStrValue(GameData.tip["ONLINE_TIME_TIP"], "NUM", hour);
				objData;
				this._facade.sendNotification(CLZNoticeName.SHOW_WINDOWS_TIP, objData);
			}
			remainingTime=3 * 60 * 60 - this._onlineTime;
			var timer:*=new Timer(1000, remainingTime);
			timer.addEventListener(TimerEvent.TIMER, timerOnlineHandler);
			timer.start();
			return;
		}

		public static function countTime(param1:uint, param2:int=0):String
		{
			var time:*=param1;
			var type:*=param2;
			var pad:*=function(param1:int, param2:int):String
			{
				if (param1 < param2)
				{
					return "0" + param1;
				}
				return param1.toString();
			};
			var day:*=time / 60 / 60 / 24;
			var hour:*=time / 60 / 60;
			var minute:*=time / 60 % 60;
			var second:*=time % 60;
			var str:String;
			switch (type)
			{
				case 0:
				{
//					str=pad(hour, 10) + ":" + pad(minute, 10) + ":" + pad(second, 10);
					break;
				}
				case 1:
				{
//					str=pad(hour * 60 + minute, 10) + ":" + pad(second, 10);
					break;
				}
				case 2:
				{
					str=hour.toString();
					break;
				}
				case 3:
				{
					str=day.toString();
					break;
				}
				default:
				{
					break;
				}
			}
			return str;
		}

		public function judgeMoneyType(roomType:String):int
		{
			if (roomType == null)
				return 0;
			var rtype:*=roomType.substr(0, 1);
			if (rtype == "P")
			{
				return 0;
			}
			return 1;
		}

		public static function contBlindPosition(param1:int, param2:int, param3:int):int
		{
			var _loc_4:int=0;
			if (param3 < 3)
			{
				if (param1 == param2)
				{
					_loc_4=2;
				}
				else
				{
					_loc_4=1;
				}
				return _loc_4;
			}
			switch (param2 - param1)
			{
				case 1:
				case -8:
				{
					_loc_4=1;
					break;
				}
				case 2:
				case -7:
				{
					_loc_4=2;
					break;
				}
				default:
				{
					break;
				}
			}
			return _loc_4;
		}

		public static function getRoomInfoById(roomType:String, roomId:int):RoomVo
		{
			var roomVo:RoomVo;
			for (var i:int=0; i < GameData.arrAllRoom.length; i++)
			{
				roomVo=GameData.arrAllRoom[i];
				if (roomVo.id == roomId)
				{
					return roomVo;
				}
			}
			return roomVo;
		}

		/*public static function getButton(clzName:String):SimpleButton
		  {
			  var clz:Class=null;
			  var btnButton:SimpleButton=null;

			  if (ApplicationDomain.currentDomain.hasDefinition(clzName))
			  {
				  clz=ApplicationDomain.currentDomain.getDefinition(clzName) as Class;
				  btnButton=new clz;
				  return btnButton;
			  }

			  return null;
		  }*/

		public static function initConfig(root:XML):void
		{
			var element:*=root.children();
			var index:uint=0;
			while (index < element.length())
			{

				config[element[index].localName()]=element[index].text();
				trace(element[index].localName() + ":" + element[index].text());
				if (element[index].localName() == "gameUI")
				{
					for each (var item:* in element.item)
					{
						GameData.arrSwfUrl.push(item.@source);
					}
					trace(GameData.arrSwfUrl);

				}
				else if (element[index].localName() == "HOST")
				{
					GameData.HOST=element[index].text();
					trace("找到host配置:" + GameData.HOST);
				}
				else if (element[index].localName() == "PORT")
				{
					GameData.PORT=int(element[index].text());
					trace("找到port配置:" + GameData.PORT);
				}
				index=index + 1;
			}
			return;
		}

		public static function initTip(tipXml:XML):void
		{
			var items:XMLList=tipXml.children();
			var index:uint=0;
			while (index < items.length())
			{

				tip[items[index].localName()]=items[index].text();
				index=index + 1;
			}
			return;
		}

		public static function initSWF(xml:XML):void
		{
			var item:XMLList=xml.children();
			var index:int=0;
			while (index < item.length())
			{
				swf[item[index].localName()]=item[index].text();
				index++;
			}		
			return;
		}

		public static function getPropById(pcate:int, pframe:int):PropVo
		{
			var xml:XMLList;
			var propVo:PropVo;
			var attrList:XMLList;
			var node:XML;
			var proName:String;
			var props:XMLList=propXml.props;
			var count:uint=0;
			var items:XML;
			while (count < props.length())
			{
				if (props[count].@pcate == pcate)
				{
					items=props[count];
					break;
				}
				count=count + 1;
			}
			xml=items.children();
			count=0;
			while (count < xml.length())
			{

				if (xml[count].@pframe == pframe)
				{
					propVo=new PropVo();
					attrList=xml[count].attributes();
					var i:int=0;
					while (i < attrList.length())
					{

						node=attrList[i];
						proName=node.name();
						if (typeof(propVo[proName]) == "int")
						{
							propVo[proName]=int(node);
							i++;
							continue;
						}
						if (typeof(propVo[proName]) == "number")
						{
							propVo[proName]=Number(node);
							i++;
							continue;
						}
						propVo[proName]=node;
						i++;
					}
					propVo.num=1;
					propVo.pcate=pcate;
					if (propVo.pcate > 10)
					{
						propVo.url=GameData.flashUrl + "img/gift/" + propVo.pcate + "_" + propVo.pframe + ".swf";
					}
					else
					{
						if (pcate == 1)
						{
							if (pframe >= 6)
							{
							}
						}
						if (pframe <= 9)
						{
							propVo.url=GameData.flashUrl + "img/prop/" + propVo.pcate + "-" + propVo.pframe + ".swf";
						}
						else
						{
							propVo.url=GameData.flashUrl + "img/prop/" + propVo.pcate + "-" + propVo.pframe + ".png";
						}
					}
					break;
				}
				count++;
			}
			return propVo;
		} // end function

		public static function getPcateProp(id:int):Array
		{
			var xml:XMLList;
			var arrProp:Array=[];
			var i:uint=0;
			var propVo:PropVo;
			var attrList:XMLList;
			var node:XML;
			var proName:String;
			var props:XMLList=propXml.props;
			var items:XML;
			while (i < props.length())
			{
				if (props[i].@pcate == id)
				{
					items=props[i];
					break;
				}
				i++;
			}
			xml=items.children();
			i=0;
			while (i < xml.length())
			{
				propVo=new PropVo();
				attrList=xml[i].attributes();
				for (var j:int=0; j < attrList.length(); j++)
				{
					node=attrList[j];
					proName=node.name();
					if (typeof(propVo[proName]) == "int")
					{
						propVo[proName]=int(node);
						continue;
					}
					if (typeof(propVo[proName]) == "number")
					{
						propVo[proName]=Number(node);
						continue;
					}
					propVo[proName]=node;
				}
				propVo.pcate=id;
				if (propVo.pcate > 10)
				{
					propVo.url=GameData.flashUrl + "img/gift/" + propVo.pcate + "_" + propVo.pframe + ".swf";
				}
				else
				{
					propVo.url=GameData.flashUrl + "img/prop/" + propVo.pcate + "-" + propVo.pframe + ".png";
				}
				trace("propVo.store:" + propVo.store);
				arrProp.push(propVo);
//				if (!propVo.store)
//				{
//				}
//				if (id == 3)
//				{
//					arrProp.push(propVo);
//				}
				i=(i + 1);
			}
			return arrProp;
		}

		public static function getPropById0(pcateid:int, pframeid:int):PropVo
		{
			var xml:XMLList;
			var propVo:PropVo;
			//http://app100642929.imgcache.qzoneapp.com/app100642929/bin-debug/assets/img/person/min/5.png
			/*var i:uint;
			var attrList:XMLList;
			var node:XML;
			var proName:String;
			var pcate:* = pcateid;
			var pframe:* = pframeid;
			var _loc_5:int = 0;
			var props:* = propXml.props;
			var ParentXML:* = new XMLList("");
			var item:*;
			for each (item in props)
			{

				var _loc_8:* = item;
				with (item)
				{
					if (@pcate == pcate)
					{
						ParentXML[_loc_5] = _loc_7;
					}
				}
			}
			xml = ParentXML.children();
			while (i < xml.length())
			{

				if (xml[i].@pframe == pframe)
				{
					propVo = new PropVo();
					attrList = xml[i].attributes();
					var ParentXML:int = 0;
					var _loc_5:* = attrList;
					while (_loc_5 in ParentXML)
					{

						node = _loc_5[ParentXML];
						proName = node.name();
						if (typeof(propVo[proName]) == "int")
						{
							propVo[proName] = int(node);
							continue;
						}
						if (typeof(propVo[proName]) == "number")
						{
							propVo[proName] = Number(node);
							continue;
						}
						propVo[proName] = node;
					}
					propVo.num = 1;
					propVo.pcate = pcate;
					if (propVo.pcate > 10)
					{
						propVo.url = GameData.flashUrl + "assets/img/gift/" + propVo.pcate + "_" + propVo.pframe + ".swf";
					}
					else
					{
						if (pcate == 1)
						{
							if (pframe >= 6)
							{
							}
						}
						if (pframe <= 9)
						{
							propVo.url = GameData.flashUrl + "assets/img/prop/" + propVo.pcate + "-" + propVo.pframe + ".swf";
						}
						else
						{
							propVo.url = GameData.flashUrl + "assets/img/prop/" + propVo.pcate + "-" + propVo.pframe + ".png";
						}
					}
					break;
				}
				i = (i + 1);
			}*/
			return propVo;
		}

		public static function getPcateProp0(param1:int):Array
		{
			var xml:XMLList;
			var arrProp:Array;
			/*var i:uint;
			var propVo:PropVo;
			var attrList:XMLList;
			var node:XML;
			var proName:String;
			var id:* = param1;
			var _loc_4:int = 0;
			var _loc_5:* = propXml.props;
			var _loc_3:* = new XMLList("");
			for each (_loc_6 in _loc_5)
			{

				var _loc_7:* = _loc_6;
				with (_loc_6)
				{
					if (@pcate == id)
					{
						_loc_3[_loc_4] = _loc_6;
					}
				}
			}
			xml = _loc_3.children();
			arrProp;
			i;
			while (i < xml.length())
			{

				propVo = new PropVo();
				attrList = xml[i].attributes();
				var _loc_3:int = 0;
				var _loc_4:* = attrList;
				while (_loc_4 in _loc_3)
				{

					node = _loc_4[_loc_3];
					proName = node.name();
					if (typeof(propVo[proName]) == "int")
					{
						propVo[proName] = int(node);
						continue;
					}
					if (typeof(propVo[proName]) == "number")
					{
						propVo[proName] = Number(node);
						continue;
					}
					propVo[proName] = node;
				}
				propVo.pcate = id;
				if (propVo.pcate > 10)
				{
					propVo.url = GameData.flashUrl + "assets/img/gift/" + propVo.pcate + "_" + propVo.pframe + ".swf";
				}
				else
				{
					propVo.url = GameData.flashUrl + "assets/img/prop/" + propVo.pcate + "-" + propVo.pframe + ".png";
				}
				trace("propVo.store:" + propVo.store);
				if (!propVo.store)
				{
				}
				if (id == 3)
				{
					arrProp.push(propVo);
				}
				i = (i + 1);
			}*/
			return arrProp;
		}

		public static function getHonorByType(param1:int):Array
		{
			var xmlList:XMLList;
			var arr:Array;
			/*var i:uint;
			var attrList:XMLList;
			var honorVo:HonorVo;
			var node:XML;
			var xmlName:String;
			var type:* = param1;
			var _loc_4:int = 0;
			var _loc_5:* = honorXml.honor.item;
			var _loc_3:* = new XMLList("");
			for each (_loc_6 in _loc_5)
			{

				var _loc_7:* = _loc_6;
				with (_loc_6)
				{
					if (@type == type)
					{
						_loc_3[_loc_4] = _loc_6;
					}
				}
			}
			xmlList = _loc_3;
			arr;
			i;
			while (i < xmlList.length())
			{

				attrList = xmlList[i].attributes();
				honorVo = new HonorVo();
				var _loc_3:int = 0;
				var _loc_4:* = attrList;
				while (_loc_4 in _loc_3)
				{

					node = _loc_4[_loc_3];
					xmlName = node.name();
					if (typeof(honorVo[xmlName]) == "number")
					{
						honorVo[xmlName] = int(node);
						continue;
					}
					honorVo[xmlName] = node;
				}
				honorVo.url = GameData.flashUrl + "assets/img/honor/" + honorVo.pcate + "-" + honorVo.pframe + ".png";
				arr.push(honorVo);
				i = (i + 1);
			}*/
			return arr;
		}

		public static function getHonorById(param1:int, param2:int):HonorVo
		{
			var xmlList:XMLList;
			var attrList:XMLList;
			var honorVo:HonorVo;
			/*var node:XML;
			var xmlName:String;
			var pcate:*=param1;
			var pframe:*=param2;
			var _loc_5:int=0;
			var _loc_6:*=honorXml.honor.item;
			var _loc_4:*=new XMLList("");
			for each (_loc_7 in _loc_6)
			{

				var _loc_8:*=_loc_7;
				with (_loc_7)
				{
					if (@pcate == pcate)
					{
					}
					if (@pframe == pframe)
					{
						_loc_4[_loc_5]=_loc_7;
					}
				}
			}
			xmlList=_loc_4;
			attrList=xmlList.attributes();
			honorVo=new HonorVo();
			var _loc_4:int=0;
			var _loc_5:*=attrList;
			while (_loc_5 in _loc_4)
			{

				node=_loc_5[_loc_4];
				xmlName=node.name();
				if (typeof(honorVo[xmlName]) == "int")
				{
					honorVo[xmlName]=int(node);
					continue;
				}
				if (typeof(honorVo[xmlName]) == "number")
				{
					honorVo[xmlName]=uint(node);
					continue;
				}
				honorVo[xmlName]=node;
			}*/
			honorVo.url=GameData.flashUrl + "img/honor/" + honorVo.pcate + "-" + honorVo.pframe + ".png";
			return honorVo;
		}

		public static function getRoomXML(param1:XMLList, param2:int, param3:String):RoomVo
		{
			var _loc_5:XMLList=null;
			var _loc_6:RoomVo=null;
			var _loc_7:XML=null;
			var _loc_8:String=null;
			var _loc_4:uint=0;
			while (_loc_4 < param1.length())
			{

				_loc_5=param1[_loc_4].attributes();
				if (param2 >= int(_loc_5[0]))
				{
				}
				if (param2 <= int(_loc_5[1]))
				{
					_loc_6=new RoomVo();
					for each (_loc_7 in _loc_5)
					{

						_loc_8=_loc_7.name();
						if (typeof(_loc_6[_loc_8]) == "int")
						{
							_loc_6[_loc_8]=int(_loc_7);
						}
						else if (typeof(_loc_6[_loc_8]) == "number")
						{
							_loc_6[_loc_8]=uint(_loc_7);
						}
						else
						{
							_loc_6[_loc_8]=_loc_7;
						}
						_loc_6.type=param3;
						_loc_6.id=param2;
					}
					return _loc_6;
				}
				_loc_4=_loc_4 + 1;
			}
			return null;
		}
		private static var cache:Dictionary=new Dictionary(true);

		public static function getClass(className:String):Class
		{
			var clz:Class=null;
			var count:int=0;
			while (count < domainArr.length)
			{

				if (domainArr[count].hasDefinition(className))
				{
					clz=domainArr[count].getDefinition(className) as Class;
					return clz;
				}
				count=count + 1;
			}
			return null;
		}

		/**
		 *
		 * @param name
		 * @return
		 */
		public static function getBitMapDataByCache(name:String):BitmapData
		{
			//trace("get BitmapData:"+name);
			var bd:BitmapData=cache[name]

			if (bd == null)
			{
				try
				{
					var _class:Class=GameData.getClass(name);
					if (_class == null)
					{
//						trace("GameData get BitmapData null:" + name);
						return null;
					}
					bd=new _class()
					cache[name]=bd;
				}
				catch (e:Error)
				{

				}
			}
			return bd;
		}

		/**
		 *
		 * @param name
		 * @return
		 */
		public static function getMCByCache(name:String):MovieClip
		{
			var mc:MovieClip=cache[name]
			if (mc == null)
			{
				var _class:Class=GameData.getClass(name);
				if (_class == null)
				{
					trace("GameData get getMC null:" + name);
					return null;
				}
				mc=new _class()
				cache[name]=mc;
			}
			return mc;
		}

		public static function getMovieClip(mcName:String):MovieClip
		{
			var clzmc:Class=null;
			var mc:MovieClip=null;
			var count:int=0;
			while (count < domainArr.length)
			{

				if (domainArr[count].hasDefinition(mcName))
				{
					try
					{
						clzmc=domainArr[count].getDefinition(mcName) as Class;
						mc=new clzmc;
						return mc;
					}
					catch (error:Error)
					{

					}

				}
				count=count + 1;
			}
			return null;
		}

		public static function getSprite(mcName:String):Sprite
		{
			var clz:Class=null;
			var mc:Sprite=null;
			var count:int=0;
			while (count < domainArr.length)
			{

				if (domainArr[count].hasDefinition(mcName))
				{
					clz=domainArr[count].getDefinition(mcName) as Class;
					mc=new clz;
					return mc;
				}
				count=count + 1;
			}
			return null;
		}

		public static function getButton(btnName:String):SimpleButton
		{
			var clzbtn:Class=null;
			var btn:SimpleButton=null;
			var count:int=0;
			while (count < domainArr.length)
			{

				if (domainArr[count].hasDefinition(btnName))
				{
					clzbtn=domainArr[count].getDefinition(btnName) as Class;
					btn=new clzbtn;
					return btn;
				}
				count=count + 1;
			}
			return null;
		}

		/*public static function getClass(clzName:String):Class
		{
			var clz:Class=null;
			if (ApplicationDomain.currentDomain.hasDefinition(clzName))
			{
				clz=ApplicationDomain.currentDomain.getDefinition(clzName) as Class;

				return clz;
			}

			return null;
		}*/

		/*public static function getMovieClip(clzName:String):MovieClip
		{
			var clz:Class=null;
			var mc:MovieClip=null;

			if (ApplicationDomain.currentDomain.hasDefinition(clzName))
			{
				clz=ApplicationDomain.currentDomain.getDefinition(clzName) as Class;
				mc=new clz;
				return mc;
			}

			return null;
		}*/

		/*public static function getSprite(clzName:String):Sprite
		{
			var clz:Class=null;
			var sprite:Sprite=null;

			if (ApplicationDomain.currentDomain.hasDefinition(clzName))
			{
				clz=ApplicationDomain.currentDomain.getDefinition(clzName) as Class;
				sprite=new clz;
				return sprite;
			}

			return null;
		}*/


		public static function playMcAllChild(param1):void
		{
			var _loc_2:int=0;
			var _loc_3:MovieClip=null;
			if (param1 as Sprite == null)
			{
			}
			if (param1 as MovieClip != null)
			{
				_loc_2=0;
				while (_loc_2 < param1.numChildren)
				{

					_loc_3=param1.getChildAt(_loc_2) as MovieClip;
					if (_loc_3 != null)
					{
						_loc_3.play();
						playMcAllChild(_loc_3);
					}
					else if (param1.getChildAt(_loc_2) as Sprite)
					{
						playMcAllChild(param1.getChildAt(_loc_2));
					}
					_loc_2=_loc_2 + 1;
				}
			}
			return;
		}


		/**
		 * 停止所有动画，迭代
		 * @param mc
		 */
		public static function stopMcAllChild(mc):void
		{
			var count:int=0;
			var child:MovieClip=null;
			if (mc as Sprite == null)
			{
			}
			if (mc as MovieClip != null)
			{
				count=0;
				while (count < mc.numChildren)
				{

					child=mc.getChildAt(count) as MovieClip;
					if (child != null)
					{
						child.stop();
						stopMcAllChild(child);
					}
					else if (mc.getChildAt(count) as Sprite)
					{
						stopMcAllChild(mc.getChildAt(count));
					}
					count=count + 1;
				}
			}
			return;
		}

		/**
		 * 根据房间人数，找到显示的座位索引数组
		 * @param roomType
		 * @return
		 */
		public static function getRoomSit(roomType:int):Array
		{
			var arrSeatId:Array=[1, 2, 3, 4, 5, 6, 7, 8, 9];
			switch (roomType)
			{
				case 3:
				{
					arrSeatId=[2, 5, 8];
					break;
				}
				case 4:
				{
					arrSeatId=[1, 3, 7, 9];
					break;
				}
				case 5:
				{
					arrSeatId=[1, 3, 5, 7, 9];
					break;
				}
				case 6:
				{
					arrSeatId=[1, 2, 3, 7, 8, 9];
					break;
				}
				case 7:
				{
					arrSeatId=[1, 2, 3, 5, 7, 8, 9];
					break;
				}
				case 8:
				{
					arrSeatId=[1, 2, 3, 4, 6, 7, 8, 9];
					break;
				}
				default:
				{
					break;
				}
			}
			return arrSeatId;
		}

	}
}

class TypeDescription
{

	/**
	 * 类的属性列表, 包括访问器 (accessor) 和变量 (variable)
	 */
	public var properties:Array; /* of String */


	/**
	 * 类名
	 */
	public var name:String;



	/**
	 * 由 flash.utils.describeType() 获取的原始 XML 数据
	 */
	public var typeInfo:XML;


	public function TypeDescription()
	{
	}

	public function Copy(from:Object, to:Object):void
	{
		for each (var propertie:* in properties)
		{
//			trace("拷贝属性:break "+propertie);
			to[propertie.toSting()]=from[propertie.text];
		}
	}

	public function traceInfo():void
	{
		trace(name);
		trace(properties);
		trace(typeInfo);
	}
}
